package business

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type ClassifyRouter struct {
}

// InitClassifyRouter 初始化 企业分类 路由信息
func (s *ClassifyRouter) InitClassifyRouter(Router *gin.RouterGroup) {
	classifyRouter := Router.Group("classify").Use(middleware.OperationRecord())
	classifyRouterWithoutRecord := Router.Group("classify")
	var classifyApi = v1.ApiGroupApp.BusinessApiGroup.ClassifyApi
	{
		classifyRouter.POST("createClassify", classifyApi.CreateClassify)             // 新建企业分类
		classifyRouter.DELETE("deleteClassify", classifyApi.DeleteClassify)           // 删除企业分类
		classifyRouter.DELETE("deleteClassifyByIds", classifyApi.DeleteClassifyByIds) // 批量删除企业分类
		classifyRouter.PUT("updateClassify", classifyApi.UpdateClassify)              // 更新企业分类

	}
	{
		classifyRouterWithoutRecord.GET("findClassify", classifyApi.FindClassify)                 // 根据ID获取企业分类
		classifyRouterWithoutRecord.GET("getClassifyList", classifyApi.GetClassifyList)           // 获取企业分类列表
		classifyRouterWithoutRecord.GET("adminGetClassifyList", classifyApi.AdminGetClassifyList) // 管理员获取企业分类列表
	}
}
